﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleAppB5.grapics
{
    /// <summary>
    /// 三角形
    /// </summary>
    public class Triangle : Graphical
    {
        private double baseLenth = 0;
        private double highLenth = 0;

        public Triangle()
        {
            Random r = new Random();
            baseLenth = r.Next(1, 10);
            highLenth = r.Next(1, 10);
        }
        public override double CalculateArea()
        {
            return (this.baseLenth * this.highLenth) / 2;
        }
    }
}
